# Begin: Custom commands for incoming e-mails BEFORE decryption log(1,'Begin: Custom commands for incoming e-mails BEFORE decryption'); if (from_managed_domain()) { if (compare('x-smenc','equal','yes')) { log(1,'Encryption requested by Add-In, set x-header for <%OEM-WEBMAIL-GINA%> encryption'); setheader('x-smwebmail','yes'); rmheader('x-smenc'); } if (compare('subject','substitute','@TRIGGERTEXT@')) { log(1,'Encryption requested by tag @TRIGGERTEXT@, set x-header for <%OEM-WEBMAIL-GINA%> encryption'); setheader('x-smwebmail','yes'); } if (compare('sensitivity','equal','companyconfidential')) { log(1,'Encryption requested by sensitivity flag, set x-header for <%OEM-WEBMAIL-GINA%> encryption'); setheader('x-smwebmail','yes'); rmheader('sensitivity'); } if (compare('subject','substitute','\[priv\]')) { log(1,'<%OEM-WEBMAIL-GINA%> encryption requested by tag [priv], set x-header for <%OEM-WEBMAIL-GINA%> encryption'); setheader('x-smwebmail','yes'); } if (compare('x-smwebmail','equal','yes')) { log(1,'Encrypting with <%OEM-WEBMAIL-GINA%> technology'); rmheader('x-smwebmail'); compare('subject','substitute','\[.*?\].*?'); createaccount(); createkeys('@CREATEGPGKEYS@'); $createwebuser; if (encrypt_webmail()) { @TAGSIGNED@ } else { log(1,'webmail encryption failed'); drop ('550','Mail not accepted'); # var 1: bounce('bounce_noenc'); } } } log(1,'End: Custom commands for incoming e-mails BEFORE decryption'); # End: Custom commands for incoming e-mails BEFORE decryption